package com.example.fsd.controller.comments;

import com.example.fsd.common.result.R;
import com.example.fsd.pojo.Comments;
import com.example.fsd.service.comments.ICommentsService;
import com.example.fsd.service.navmenu.INavMenuService;
import com.example.fsd.vo.PageVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhangguihong
 * @since 2024-11-19
 */
@RestController
@RequestMapping("/comments")
@RequiredArgsConstructor
public class CommentsController {
    private  final ICommentsService commentsService;

    @PostMapping("/saveComments")
    private R saveComments(@RequestBody Comments comments){
        return commentsService.saveComments(comments);
    }

    @GetMapping("/getCommentsList")
    private R getCommentsList(PageVo pageVo){
        return commentsService.getCommentsList(pageVo);
    }

}
